﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Audio;

namespace Platformer.Player_Items
{
    class Invantory
    {

        List<Useable_Item> total;
        List<Useable_Item> active;

        public Invantory()
        {
            total = new List<Useable_Item>();
            active = new List<Useable_Item>();
        }

        public void add(Useable_Item ui)
        {
            total.Add(ui);
        }

        public void addAvtive(int i)
        {
            active.Add(new Useable_Item(i));
        }
        public void remove(int i)
        {
            foreach (Useable_Item j in active)
            {
                if (j.ID == i)
                {
                    active.Remove(j);
                }
            }
        }

        public int getChivalry()
        {
            int r = 0;
            foreach (Useable_Item u in active)
            {
                r += u.getChivalry();
            }
            return r;
        }
        public int getSanity()
        {
            int r = 0;
            foreach (Useable_Item u in active)
            {
                r += u.getSanity();
            }
            return r;
        }
        public int getCourage()
        {
            int r = 0;
            foreach (Useable_Item u in active)
            {
                r += u.getCourage();
            }
            return r;
        }

    }
}
